package com.yangtao.springbootfreemarker.common;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class CommonPageController {

	/************映射页面************************/
	@RequestMapping("pages/{e}/{d}/{c}/{b}/{a}.html")
	public String page(@PathVariable("e") String e, @PathVariable("d") String d, @PathVariable("c") String c, @PathVariable("b") String b, @PathVariable("a") String a) {
		return e + "/" + d + "/" + c + "/" + b + "/" + a;
	}

	@RequestMapping("pages/{d}/{c}/{b}/{a}.html")
	public String page(@PathVariable("d") String d, @PathVariable("c") String c, @PathVariable("b") String b, @PathVariable("a") String a) {
		return d + "/" + c + "/" + b + "/" + a;
	}

	@RequestMapping("pages/{c}/{b}/{a}.html")
	public String page(@PathVariable("c") String c, @PathVariable("b") String b, @PathVariable("a") String a) {
		return c + "/" + b + "/" + a;
	}

	@RequestMapping("pages/{b}/{a}.html")
	public String page(@PathVariable("b") String b, @PathVariable("a") String a) {
		return b + "/" + a;
	}

	@RequestMapping("pages/{a}.html")
	public String page(@PathVariable("a") String a) {
		return a;
	}

	@RequestMapping("/")
	public String index() {
		return "/pages/zy/single_project_data_tree.html";
		//return "pages/index.html";
	}
}
